<section app-tutorial-content>
<p>
To make the creep transfer energy back to the spawn, you need to use the method
<code>Creep.transfer</code>.
However, remember that it should be done when the creep is next to the spawn, so the creep needs to walk back.
</p>
<p>
If you modify the code by adding the check <code>.store.getFreeCapacity()&nbsp;>&nbsp;0</code> to the creep,
it will be able to go back and forth on its own, giving energy to the spawn and returning to the source.
</p>
<div class='objective'>
<div class='fa fa-caret-right'></div>
Extend the creep program so that it can transfer harvested energy to the spawn and return back to work.
</div>
<div class='objective'>
<div class='fa fa-caret-down'></div>
Documentation:
<ul>
<li>
<code><a app-nw-external-link href='http://docs.screeps.com/api/#Creep.transfer' target='_blank'>
Creep.transfer
</a></code>
</li>
<li>
<code><a app-nw-external-link href='http://docs.screeps.com/api/#Creep.store' target='_blank'>
Creep.store
</a></code>
</li>
</ul>
</div>
<app:tutorial-code></app:tutorial-code>
<div class='tutorial-controls'>
<md:button class='md-raised md-primary' ng:click='Tutorial.close()'>Got it</md:button>
</div>
</section>
